#include <initializer_list>
#include <vector>
#include <iostream>

class MagicFoo {
public:
    std::vector<int> vec;
    MagicFoo(std::initializer_list<int> list) {
        for (auto it = list.begin(); it != list.end(); ++it)
        {
            vec.push_back(*it);
        }
        
    }
};

int main() {
    MagicFoo magicFoo = {1,2,3,4,5};
    std::cout<<"MagicFoo: ";
    for(auto it = magicFoo.vec.begin(); it != magicFoo.vec.end(); ++it)
    {
        std::cout<<*it<<", ";
    }
    std::cout<<std::endl;
    return 0;
}